/**
 * Company : SIANGKLOM.
 * Created By : Chatree Siangklom
 * Created On : Jan 10, 2014  12:32:05 PM 
 * e-Mail : dr_chatree@hotmail.com
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : com.tis.interfaces.controller.ApplicationLogs
 * File Name : ExcelWorkbookView.java
 * TODO
 */
package com.tis.interfaces.controller.ApplicationLogs;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import jxl.write.NumberFormat;
import jxl.write.WritableCell;
import jxl.write.WritableCellFormat;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;

import org.springframework.web.servlet.view.document.AbstractJExcelView;

/**
 * @author Chatree Siangklom of Administrator
 * Date =Jan 10, 2014 : 12:32:05 PM 
 * CreateBy=Chatree Siangklom
 * TODO
 */
public class ExcelWorkbookView extends AbstractJExcelView {

	/**
	 * Date =Jan 10, 2014 : 12:32:05 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public ExcelWorkbookView() {
		// TODO Auto-generated constructor stub
	}

	/** (Javadoc)
	 * @see org.springframework.web.servlet.view.document.AbstractJExcelView#buildExcelDocument(java.util.Map, jxl.write.WritableWorkbook, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	 * Date =Jan 10, 2014 : 12:32:23 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	@Override
	protected void buildExcelDocument(	Map<String, Object> model,
										WritableWorkbook workbook, HttpServletRequest request,
										HttpServletResponse response) throws Exception {
		
		WritableCellFormat wcfCurrency = new WritableCellFormat(new NumberFormat("#,##0.00"));
		
		  //Note the workbook is getting built from a template which already has the existing worksheet
		  WritableSheet ws = workbook.getSheet("Asset-Liability Inventory");
		  
		  //WritableCell  wc = new Number(1,6,9999.0, wcfCurrency);
		  //ws.addCell(wc);
	}

}
